<%@ page language="java" %>
<%@ page import="java.security.*" %>

<%! public static final String byte2hex(byte[] bytes)
{ StringBuffer buf = new StringBuffer(bytes.length * 2);
  for(int i = 0;i < bytes.length;i++)
  {
    if(((int)bytes[i] & 0xff) < 0x10)
    {
       buf.append("0");
    }
   buf.append(Long.toString((int)bytes[i] & 0xff,16));
  }
 return buf.toString();
}
%>
<%
	try{
	MessageDigest  md5= MessageDigest.getInstance("MD5");
	String strKey="neusoftbipt";
	String strTime="2007-10-12 15:15:15";
	String strTmp=null;
	String strVerify=null;
	String strUrl=null;
	System.out.println("test_sso.jsp ----strTime--->"+strTime);
	strTmp="admin"+strKey+strTime;
	strVerify = byte2hex(md5.digest(strTmp.getBytes()));
	strUrl="ssofri.jsp?un=admin&verify="+strVerify+"&time="+strTime;
	System.out.println("--test_sso-url-------->"+strUrl);
    response.sendRedirect(strUrl);
    }
   catch(Exception e){
   	System.out.println(" test_sso.jsp ----error--->"+e.getMessage());
   }
%>
